package com.leo.train.business.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

//drop table if exists `confirm_order`;
//create table `confirm_order` (
//        `id` bigint not null comment 'id',
//        `member_id` bigint not null comment '会员id',
//        `date` date not null comment '日期',
//        `train_code` varchar(20) not null comment '车次编号',
//        `start` varchar(20) not null comment '出发站',
//        `end` varchar(20) not null comment '到达站',
//        `daily_train_ticket_id` bigint not null comment '余票ID',
//        `tickets` json not null comment '车票',
//        `status` char(1) not null comment '订单状态|枚举[ConfirmOrderStatusEnum]',
//        `create_time` datetime(3) comment '新增时间',
//        `update_time` datetime(3) comment '修改时间',
//primary key (`id`),
//index `date_train_code_index` (`date`, `train_code`)
//        ) engine=innodb default charset=utf8mb4 comment='确认订单';
@Data
public class ConfirmOrder {
    private Long id;
    private Long memberId;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date date;
    private String trainCode;
    private String start;
    private String end;
    private Long dailyTrainTicketId;
    private String tickets;
    private String status;
    private Date createTime;
    private Date updateTime;
    private String logId;  // 日志跟踪号
}
